From: Federico G. Schwindt Date: Tue, 24 Nov 2015 20:09:10 +0000 (+0000) Subject: Silence warning with -Wextra X-Git-Tag: archive/raspbian/2.11.3-2+rpi1^2~24^2^2~168^2 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=4fc2d8234d17624525552735c882486367c5521d;p=utf8proc.git Silence warning with -Wextra Fixes #60. --- diff --git a/utf8proc.c b/utf8proc.c index b685e13..1f17730 100644 --- a/utf8proc.c +++ b/utf8proc.c @@ -436,7 +436,8 @@ UTF8PROC_DLLEXPORT utf8proc_ssize_t utf8proc_decompose( if (decomp_result < 0) return decomp_result; wpos += decomp_result; /* prohibiting integer overflows due to too long strings: */ - if (wpos < 0 || wpos > SSIZE_MAX/sizeof(utf8proc_int32_t)/2) + if (wpos < 0 || + wpos > (utf8proc_ssize_t)(SSIZE_MAX/sizeof(utf8proc_int32_t)/2)) return UTF8PROC_ERROR_OVERFLOW; } }